export function getDate(){
  return dateFormat('Y-m-d H:i:s')
}

export function dateFormat(format) {
  let date = new Date();
  let format_arr = {
    "Y": date.getFullYear(),
    "m": date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : "0" + (date.getMonth() + 1),
    "d": date.getDate(),
    "H": date.getHours(),
    "i": date.getMinutes(),
    "s": date.getSeconds(),
  };
  for (let key in format_arr) {
    format = format.replace(key, format_arr[key]);
  }
  return format;
}
